<?php
require_once "inc/Request.php";
class MainMenu {
	private $menu = array(
			'About' => '/',
			'Tal' => '/tal',
			'Tales' => '/tales',
			'Metal' => '/metal',
			'Random' => '/RandomGenerator',
		);
	function getMenu() {
		$request = Request::getInstance();
		$current = '/'.((isset($request->path[0]))?$request->path[0]:'');
		$result = array();
		foreach($this->menu as $key=>$url) {
			$result[] = array(
				'href' => $url,
				'name' => $key,
				'current' => ($current === $url),
			);
		}
		return $result;
	}
}

